﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Remember.WPF
{
    /// <summary>
    /// Interaction logic for MenuItemControl.xaml
    /// </summary>
    public partial class MenuItemControl : UserControl
    {
        public event EventHandler OnClick;
        public MenuItemControl()
        {
            InitializeComponent();
        }

        private void UserControl_MouseEnter(object sender, MouseEventArgs e)
        {
            ui1.Stroke = new SolidColorBrush(Colors.LimeGreen);
            ui1.StrokeThickness = 2;
            ui2.Stroke = new SolidColorBrush(Colors.LimeGreen );
        }

        private void UserControl_MouseLeave(object sender, MouseEventArgs e)
        {
            ui1.Stroke = new SolidColorBrush(Colors.WhiteSmoke );
            ui1.StrokeThickness = 1;
            ui2.Stroke = new SolidColorBrush(Colors.WhiteSmoke);
        }

        private void UserControl_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            if (OnClick != null)
            {
                OnClick(sender, e);
            }
        }

    }
}
